home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0075-Re InsideOut and Ma-Oct89 < prev    next >
Encoding:
Text File  |  1989-10-13  |  3.5 KB  |  83 lines  |  [TEXT/GEOL]

  1. Item    1710599                         13-Oct-89        10:55
  2.  
  3. From:   D2086                           Efficient Field Svc, C Faith,PRT
  4.  
  5. To:     AU0008                          Kopfwerk EDV SW Entwicklung
  6.         MADA.EUROPE                     MacApp Dev Assoc Europe, E Carrasco
  7.         D4684                           Robins Analytics, S Robins,PRT
  8.  
  9. cc:     MACAPP.TECH$                    MACAPP Tech
  10.  
  11. Sub:    Re: InsideOut and MacApp
  12.  
  13. Tommi, Eric and Doug,
  14.  
  15. I have also spent considerable time using MacApp and InsideOut together.  I
  16. have developed the following set of classes:
  17.  
  18. TDatabase - This is an abstract class that implements all the typical (i.e.
  19. found in most database engines) behavior.
  20.  
  21. TISOApp - This is a subclass of TApplication that handles the changes needed
  22. when working with Inside Out as a document( ooh thats ugly).  TISOApp
  23. constrains the application to one open InsideOut Database as well as some of
  24. the other things that need to be done, in particular opening from the finder,
  25. handling calls to DBIdle and the InsideOut debugger etc.  It calls upon the
  26. TDatabase object to open or create itself so those actions are handled by the
  27. TDatabase object.
  28.  
  29. TInsideOutDB -  This is the subclass of TDatabase that is designed specifically
  30. for InsideOut.  It is where the actual calls to InsideOut routines are made.
  31. It handles error checking and locking and releasing locks as well as all the
  32. other InsideOut specific needs.
  33.  
  34. TDBHandler - Since most interaction with InsideOut is via views (for lurkers:
  35. views are essentially record types which can be inserted into or retrieved from
  36. the database the can include fields of many different files at once with
  37. InsideOut assembling the correct parts automatically), and each view
  38. necessitates different calls to insideOut there needs to be some way to specify
  39. this for a given record type.  TDBHandler is an abstract class that is
  40. subclassed for each type of view that one wishes to handle.
  41.  
  42. Methods of TDBHandler can be as simple as simple as
  43.  
  44. TSpecificHandler = OBJECT(TDBHandler)
  45.  
  46.     TSpecificHandler.ISpecificHandler;
  47.     TSpecificHandler.Insert(theRec: recType);
  48.     TSpecificHandler.Update(theRec: recType);
  49.     TSpecificHandler.Get(theRec: recType);
  50.     TSpecificHandler.Delete(theRec: recType);
  51.     etc.
  52.  
  53. END;
  54.  
  55. What this does is allow the applications interface to the database to be very
  56. simple.  All the actions specific to InsideOut calls are located inside this
  57. set of objects.  TInsideOutDB knows the various viewRefNums for the open views
  58. and handles this part automatically.
  59.  
  60. TDatabase contains a TList of the DBHandlers that are available to it at any
  61. given time so once a view is opened it can be used by other objects to access
  62. the view records of that type.
  63.  
  64. I am still trying to smooth things up a bit but, these objects seem to be very
  65. easy to use and well suited to most tasks that I have put them to. I am using
  66. them for the implementation to the AppleLink Filing system I am doing for MADA.
  67. Hence the source will also be available through MADA in the future.
  68.  
  69. I have also implemented a set of Dialog Entry Objects that make it very easy to
  70. implement a dialog that handles Add, Delete, Update, and Search with most of
  71. the work being the creation of the view.
  72.  
  73. I am still working on some of the error handling aspects of these objects but
  74. on the whole they work reasonably well right now.  I have tried to make them as
  75. generic as possible.
  76.  
  77. Any suggestions for improvements or requests for features would be appreciated.
  78.  
  79. Regards,
  80.  
  81. Curtis
  82.  
  83.